<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">

    <link rel="icon" href="../img/web/web.ico"/>
    <link rel="stylesheet" href="../layui/css/layui.css"/>
    <link rel="stylesheet" href="../js/fullcalendar/fullcalendar.min.css"/>
    <link rel="stylesheet" href="../js/fullcalendar/fullcalendar.print.min.css"/>
    <link rel="stylesheet" href="../css/app.css"/>
<body ontouchstart="">

<div class="layui-fluid">
    <div class="layui-row layui-col-space15 vip-calendar-box">
        <div class="layui-col-md3">

            <div class="layui-card">
                <div class="layui-card-header">FullCalendar</div>
                <div class="layui-card-body">
                    这是一个jQuery插件，它提供了全尺寸，可拖动，使用Ajax的操作方式，并且可以使用自己的feed格式，如谷歌日历。
                </div>
            </div>

        </div>
        <div class="layui-col-md9">

            <div class="layui-card">
                <div class="layui-card-header layui-elip">日历插件 中文手册: <a target="_blank" href="https://www.helloweba.net/javascript/445.html">https://www.helloweba.net/javascript/445.html</a></div>
                <div class="layui-card-body">
                    <div id='calendar'></div>
                </div>
            </div>

        </div>
    </div>
</div>

<script src='../js/fullcalendar/lib/jquery.min.js'></script>
<script src='../js/fullcalendar/lib/moment.min.js'></script>
<script src='../js/fullcalendar/fullcalendar.min.js'></script>
<script src='../js/fullcalendar/locale/zh-cn.js'></script>
<script type="text/javascript" src="../layui/layui.js"></script>
<script type="text/javascript">
layui.use('layer',function(){
    var $ = layui.$, layer = layui.layer;

    $('#calendar').fullCalendar({
        customButtons: {
            myCustomButton: {
                text: '自定义按钮',
                click: function() {
                    alert('点击了自定义按钮!');
                }
            }
        }
        // 设置头部信息，如果不想显示，可以设置header为false
        ,header: {
            // 日历头部左边：初始化切换按钮
            left: 'prev,next,today',
            // 日历头部中间：显示当前日期信息
            center: 'title',
            // 日历头部右边：初始化视图
            right: 'month,agendaWeek,agendaDay'
        }
        ,weekends: true             // 是否显示周六和周日
        ,dayClick: function(date, allDay, jsEvent, view) {
            console.log(date,allDay,isEvent,view);
        }
        ,eventClick: function(event) {
            console.log(event);
        }
        ,events: [
            {
                title: 'All Day Event',
                start: '2018-01-16'
            },
            {
                title: 'Long Event',
                start: '2018-01-19',
                end: '2018-01-20'
            },
            {
                id: 998,
                title: 'Repeating Event',
                start: '2018-01-01'
            },
            {
                id: 999,
                title: 'Repeating Event',
                start: '2018-01-10T16:00:00'
            },
            {
                title: 'Conference',
                start: '2018-01-16',
                end: '2018-01-17'
            },
            {
                title: 'Meeting',
                start: '2018-01-16T10:30:00',
                end: '2018-01-02T12:30:00'
            }
        ]
    });

});
</script>
</body>
</html>